package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
//@EnableDiscoveryClient
public class SpringConfigClientApplication {

	@Value("${foo}")
	private String name;

	@RequestMapping("/app")
	String hello() {
		return "Hello " + name + "!";
	}

	public static void main(String[] args) {
		new SpringApplicationBuilder(SpringConfigClientApplication.class).web(true).run(args);
//		SpringApplication.run(SpringConfigClientApplication.class);
	}
}
